package com.sanxiau.dormitory.yang.mapper;

import com.sanxiau.dormitory.yang.entity.*;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface AttendanceMapper {
    /*通过ID查询用户*/
    public LoginIn queryUserByID(int id);
    /*通过账号查询用户*/
    public LoginIn queryUserByUser_name(String user_name);
    /*通过学号查询学生*/
    public Student queryStudentByStu_id(String stu_id);
    /*通过考勤时间查询考勤记录*/
    public Dorout queryDoroutsByOut_date(String out_date,String hou_id,String dor_id);
    /*查询学生是否已完成考勤*/
    public Attendance queryAttendanceFalse(String check_time,String end_time,String stu_id);

    /*添加考勤记录*/
    public int addAttendanceRecord(Attendance attendance);

    /*查询所有考勤记录*/
    public List<Attendance> queryAllAttendance();
    /*更改考勤信息*/
    public int updateDorout(Dorout dorout);
    /*查询所有楼房号*/
    public List<Dorm> queryAllHous();
    /*查询指定楼房号下的所有寝室号*/
    public List<Dorm> queryAllDors(String hou);
    /*添加缺勤信息*/
    public int updateOut_why(Dorout dorout);


}
